@extends('adminer.admin')
@section("style")
    <link href="/dwz/themes/default/tree.css" rel="stylesheet" type="text/css" media="screen">
@endsection
@section('content')
    <!-- BEGIN PAGE HEADER-->
    @include("adminer.public.bread")
    <!-- END PAGE HEADER-->
    <!-- BEGIN PAGE CONTENT-->
    <div class="row-fluid">
        <div class="span12">
            <div class="widget">
                <div class="widget-title">
                    <h4><i class="icon-align-left"></i>{{$title}}</h4>
                </div>
                <div class="widget-body">
                    <div class="alert alert-error" id="error" style="display: none">
                        <button class="close" data-dismiss="alert">×</button>
                        <strong id="error-tip">Error!</strong>
                    </div>
                    <div class="dd" id="navTab">
                        <form method="post" action="{{route('role.assign_do',$info['id'])}}" class="pageForm required-validate" id="main-form">
                            <div class="pageFormContent" layouth="60">
                                <div>
                                    <ul class="tree treeCheck expand" id="tab_spe">
                                        <?=isset($purviewstr)?$purviewstr:'';?>
                                    </ul>
                                </div>
                            </div>
                            <div class="form-actions">
                                <button type="submit" class="btn btn-success">保存</button>
                                <button type="button" class="btn" onclick="javascript:window.history.back();">放弃</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- END PAGE CONTENT-->
@endsection
@section("script")
    <script src="/dwz/js/dwz.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        jQuery(document).ready(function() {
            // initiate layout and plugins
            App.init();
        });
        $(function () {
            DWZ.init("/dwz/dwz.frag.xml", {
                //loginUrl: "login_dialog.html", loginTitle: "登录", // 弹出登录对话框
                loginUrl:"/adminer/login",  // 跳到登录页面
                statusCode: {ok: 200, error: 300, timeout: 301}, //【可选】
                pageInfo: {pageNum: "pageNum", numPerPage: "numPerPage", orderField: "orderField", orderDirection: "orderDirection"}, //【可选】
                keys: {statusCode: "statusCode", message: "message"}, //【可选】
                ui: {hideMode: 'offsets'}, //【可选】hideMode:navTab组件切换的隐藏方式，支持的值有’display’，’offsets’负数偏移位置的值，默认值为’display’
                debug: false, // 调试模式 【true|false】
                callback: function () {
                    initEnv();
                    $("#themeList").theme({themeBase: "/dwz/themes"}); // themeBase 相对于index页面的主题base路径
                }
            });

        });
    </script>
@endsection